/**
 * Created by arvin on 2017/5/29 0030.
 */
var menuTimer = null;
$(window).ready(function () {

    $('.nav-btn').off('click').on('click',function(){
        if($(this).data('state')!=='open'){
            $(this).data('state','open');
            $('.nav-items-xs').removeClass('none');
            menuTimer = setTimeout(function(){
                $('.nav-btn').data('state','close');
                $('.nav-items-xs').addClass('none');
            },5000);
        }else{
            clearTimeout(menuTimer);
            $('.nav-btn').data('state','close');
            $('.nav-items-xs').addClass('none');
        }
    })
});